"""Plot exemplar morphology."""
import neurom as nm
from neurom import view
import matplotlib.pyplot as plt
import yaml

if __name__ == "__main__":
    exemplar_data = yaml.safe_load(open("../../mcmc_run/exemplar_data.yaml"))
    morph = nm.load_morphology(exemplar_data["paths"]["all"])
    plt.figure()
    ax = plt.gca()
    view.plot_morph(
        morph,
        ax=ax,
        neurite_type=nm.NeuriteType.basal_dendrite,
        soma_outline=False,
        realistic_diameters=True,
    )
    plt.axis("equal")
    plt.savefig("morph.pdf")
